package com.sky.controller.admin;

import com.sky.result.Result;
import com.sky.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@RestController(value = "adminShopController")
@RequestMapping("/admin/shop")
public class ShopController {


    @Autowired
    private ShopService shopService;

    //设置当前店铺状态
    @PutMapping("/{status}")
    public Result setStatus(@PathVariable Integer status){
        return shopService.setStatus(status);
    }

    //查询当前营业状态
    @GetMapping("/status")
    public Result getStatus(){
        return shopService.getStatus();
    }
}
